package com.hxzy.mapstruct;

import com.hxzy.controller.admin.dict.req.DictTypeAddReq;
import com.hxzy.controller.admin.dict.req.DictTypeEditReq;
import com.hxzy.controller.admin.dict.resp.DictTypeResp;
import com.hxzy.entity.SysDictType;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

@Mapper
public interface DictTypeMapStruct {

    DictTypeMapStruct  INSTANCE= Mappers.getMapper(DictTypeMapStruct.class);

    /**
     * 转换对象为实体类
     * @param req
     * @return
     */
    SysDictType convert(DictTypeAddReq req);

    /**
     * 转换
     * @param db
     * @return
     */
    DictTypeResp convert(SysDictType db);

    /**
     * 转换
     * @param req
     * @return
     */
    SysDictType convert(DictTypeEditReq req);
}
